//
//  DataOperate.h
//  lianliankan
//
//

#import "ImageNode.h"

// 连连看数据数组中空值
#define kEmpty -1

// 图片四条边的方向
// 总的方向数
#define kTargetNum 4
// 向上
#define kTargetUp 0
// 向右
#define	kTargetRight 1
// 向下
#define kTargetDown 2
// 向左
#define kTargetLeft 3

@interface DataOperate : NSObject

+ (NSMutableArray *) generateGameData: (id)sender rowsnum: (int)rows colsnum: (int)cols datatype: (int)type;

+ (NSMutableArray *) refreshGameData: (id)sender gameData: (NSMutableArray *)data;

+ (NSMutableArray *) fetchPathBetweenTwoPoint: (id)sender beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data;

+ (NSMutableArray *) fetchPathPartenOne: (id)sender beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data findTarget: (int) target;

+ (NSMutableArray *) fetchPathPartenTwo: (id)sender beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data findTarget: (int) target;

+ (NSMutableArray *) fetchPathPartenThree: (id)sender beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data findTarget: (int) target;

+ (NSMutableArray *) fetchPathPartenFour: (id)sender beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data findTarget: (int) target;

+ (NSMutableArray *) fetchRandomMatchPath : (id) sender gameData : (NSMutableArray *) data;

+ (ImageNode *) fetchImageNode : (NSMutableArray *) data row : (NSInteger) row col : (NSInteger) col;

+ (Boolean) addItemToPath: (id)sender currentRow: (int)row currentCol: (int)col beginPosition: (int *)begin endPosition: (int *)end gameData: (NSMutableArray *)data currentPath : (NSMutableArray *)path;
@end
